package KernelCmIRPSystem;


/**
 * Generated from IDL interface "_KernelCmIrpOperations".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public class __KernelCmIrpOperationsStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements KernelCmIRPSystem._KernelCmIrpOperations
{
	private String[] ids = {"IDL:KernelCmIRPSystem/KernelCmIrpOperations:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = KernelCmIRPSystem._KernelCmIrpOperationsOperations.class;
	public ManagedGenericIRPConstDefs.Method[] get_kernel_cm_irp_operations_profile(java.lang.String kernel_cm_irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,KernelCmIRPSystem.GetKernelCMIRPOperationsProfileException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_kernel_cm_irp_operations_profile", true);
				_os.write_string(kernel_cm_irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:KernelCmIRPSystem/GetKernelCMIRPOperationsProfileException:1.0"))
				{
					throw KernelCmIRPSystem.GetKernelCMIRPOperationsProfileExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_kernel_cm_irp_operations_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			_KernelCmIrpOperationsOperations _localServant = (_KernelCmIrpOperationsOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_kernel_cm_irp_operations_profile(kernel_cm_irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public java.lang.String[] get_kernel_cm_irp_versions() throws KernelCmIRPSystem.GetKernelCMIRPVersionsException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_kernel_cm_irp_versions", true);
				_is = _invoke(_os);
				java.lang.String[] _result = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:KernelCmIRPSystem/GetKernelCMIRPVersionsException:1.0"))
				{
					throw KernelCmIRPSystem.GetKernelCMIRPVersionsExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_kernel_cm_irp_versions", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			_KernelCmIrpOperationsOperations _localServant = (_KernelCmIrpOperationsOperations)_so.servant;
			java.lang.String[] _result;
			try
			{
				_result = _localServant.get_kernel_cm_irp_versions();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_kernel_cm_irp_notification_profile(java.lang.String kernel_cm_irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,KernelCmIRPSystem.GetKernelCMIRPNotificationProfileException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_kernel_cm_irp_notification_profile", true);
				_os.write_string(kernel_cm_irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:KernelCmIRPSystem/GetKernelCMIRPNotificationProfileException:1.0"))
				{
					throw KernelCmIRPSystem.GetKernelCMIRPNotificationProfileExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_kernel_cm_irp_notification_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			_KernelCmIrpOperationsOperations _localServant = (_KernelCmIrpOperationsOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_kernel_cm_irp_notification_profile(kernel_cm_irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public void get_nrm_irp_version(ManagedGenericIRPConstDefs.VersionNumberSetHolder version_number_list, ManagedGenericIRPConstDefs.VersionNumberSetHolder vse_version_number_list) throws KernelCmIRPSystem.GetNRMIRPVersion
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_nrm_irp_version", true);
				_is = _invoke(_os);
				version_number_list.value = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				vse_version_number_list.value = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:KernelCmIRPSystem/GetNRMIRPVersion:1.0"))
				{
					throw KernelCmIRPSystem.GetNRMIRPVersionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_nrm_irp_version", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			_KernelCmIrpOperationsOperations _localServant = (_KernelCmIrpOperationsOperations)_so.servant;
			try
			{
				_localServant.get_nrm_irp_version(version_number_list,vse_version_number_list);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

}
